﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CIIS.Common;
using DevExpress.XtraEditors;
using Contract.Domain;

namespace CIIS
{
    public partial class ArrangementManage : Manage
    {
        public ArrangementManage()
        {
            InitializeComponent();

            InitUserControl();
        }

        private void InitUserControl()
        {
            RegisterOptFormType(typeof(Arrangement), typeof(Arrangement));

            BindGridData(typeof(t_tq_gzbz));

            InitButtonsWithFlag(new string[] { "添加" }, new EOperateType[] { EOperateType.Add });

            InitParamControl(new bool[] { true, false, true, false, true, false },
                new string[] { "特情代号：", "", "使用民警：", "", "布置地点：", "" },
                new DropdownControlParam[] { null, null, null, null, null, null });

            InitGridViewDataColumns(new string[] { "选中", "特情代号", "使用民警", "布置时间", "审核人", "登记时间" },
                new string[] { "IsSelected", "RYDH", "BZSX_SYMJ", "BZSX_SYSJ", "SHR", "RKSJ" },
                null);

            //InitGridViewOptColumnWithEvent(new string[] { "详情", "修改", "删除" },
            //    new EventHandler[] { linkDetail_click, linkModify_click, linkDelete_click });
            InitGridViewOptColumnWithFlag(new string[] { "详情", "修改", "删除" },
                new EOperateType[] { EOperateType.Detail, EOperateType.Modify, EOperateType.Delete });
        }

        //void btnAdd_click(object sender, EventArgs ent)
        //{
        //    Arrangement dlg = new Arrangement();
        //    dlg.OptType = EOperateType.Add;
        //    dlg.ShowDialog();
        //}
        //void linkDetail_click(object sender, EventArgs ent)
        //{
        //    Arrangement dlg = new Arrangement();
        //    dlg.OptType = EOperateType.Detail;
        //    dlg.ShowDialog();
        //}
        //void linkModify_click(object sender, EventArgs ent)
        //{
        //    Arrangement dlg = new Arrangement();
        //    dlg.OptType = EOperateType.Modify;
        //    dlg.ShowDialog();
        //}
        //void linkDelete_click(object sender, EventArgs ent)
        //{
        //}
    }
}
